<?php keke_tpl_class::checkrefresh('task/sreward/admin/tpl/task_control', '1431236857' );?><!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_K['charset'];?>">
<title>keke admin</title>


<link href="tpl/css/admin_management.css" rel="stylesheet" type="text/css" />
<link href="tpl/css/button/stylesheets/css3buttons.css" rel="stylesheet" type="text/css" />
<link title="style1" href="tpl/skin/default/style.css" rel="stylesheet" type="text/css" />
<!--<link title="style2" href="tpl/skin/light/style.css" rel="stylesheet" type="text/css" />-->
<!-- <link href="tpl/js/jquery.qtip.min.css" rel="stylesheet" type="text/css" /> -->
<script type="text/javascript" src="tpl/js/jquery.js"></script>
<script type="text/javascript" src="tpl/js/keke.js"></script>
</head>
<body class="frame_body">
<div class="frame_content">
<div id="append_parent"></div>

<style type="text/css">
table tr .t_r{text-align:right}
</style>
<div class="page_title">
  <h1><?php echo $model_info['model_name'];?><?php echo $_lang['task_config'];?></h1>
    <div class="tool">
      <a href="index.php?do=<?php echo $do;?>&model_id=<?php echo $model_id;?>&view=<?php echo $view;?>&op=config"><?php echo $_lang['basic_config'];?></a>
      <a href="index.php?do=<?php echo $do;?>&model_id=<?php echo $model_id;?>&view=<?php echo $view;?>&op=control" class="here"><?php echo $_lang['control_config'];?></a>
      <a href="index.php?do=<?php echo $do;?>&model_id=<?php echo $model_id;?>&view=<?php echo $view;?>&op=priv"><?php echo $_lang['private_config'];?></a>
      <a href="index.php?do=custom&view=fields&model_id=<?php echo $model_id;?>">自定义输入字段</a>
    </div>
</div>
<div class="box post">
<div class="tabcon">
 <div class="title"><h2><?php echo $_lang['control_config'];?></h2></div>
  <form name="frm_config_reward" action="<?php echo $ac_url;?>" method="post" id="frm_config_reward">
  <input type="hidden" name="pk[model_id]" value="<?php echo $model_id;?>">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  	
<tr>
 <th scope="row" width="200"> <b><?php echo $_lang['task_conmission_tactic'];?></b><?php echo $_lang['zh_mh'];?><?php echo $_lang['task_rule_and_money_set'];?>
</th><td>&nbsp;</td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_auditing_cash_set'];?><?php echo $_lang['zh_mh'];?></th>
 <td>
<input type="text" size="10"   name="conf[audit_cash]" id="audit_cash" value="<?php echo $audit_cash;?>"  limit="required:true;type:float;between:0-" msg="<?php echo $_lang['txt_task_auditing_cash_msg'];?>" title="<?php echo $_lang['txt_task_auditing_cash_title'];?>" msgArea="audit_moeny_msg"  class="txt"> <?php echo $_lang['yuan'];?>
<?php echo $_lang['task_cash_notice'];?><span id="audit_moeny_msg"></span>
</td>
    </tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['set_task_min_cash'];?><?php echo $_lang['zh_mh'];?></th>
 <td>
<input type="text" size="10"   name="conf[min_cash]" id="min_cash" value="<?php if($min_cash) { ?><?php echo $min_cash;?><?php } else { ?>1<?php } ?>" limit="type:float;required:true;between:0-" msg=" <?php echo $_lang['task_min_cash_msg'];?>" title="<?php echo $_lang['task_min_cash_title'];?>"  msgArea="task_min_cash_msg" class="txt"/><?php echo $_lang['yuan'];?>
(设置任务最小金额不得小于0元)<span id="task_min_cash_msg"></span>
 </td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_deduct_rate'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
<input type="text" size="10" name="conf[task_rate]" value="<?php echo $task_rate;?>" id="task_rate" limit="required:true;type:int;len:1-3;between:0-100" msg="<?php echo $_lang['task_deduct_rate_msg'];?>" title="<?php echo $_lang['task_deduct_rate_title'];?>" msgArea="deduct_scale_msg" class="txt"/>%<?php echo $_lang['task_deduct_rate_title'];?><span id="deduct_scale_msg"></span>
</td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['deduct_rate_from_fail_task'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
<input type="text" size="10" name="conf[task_fail_rate]" id="task_fail_rate" value="<?php echo $task_fail_rate;?>" limit="required:true;type:int;len:1-3;between:0-100" msg="<?php echo $_lang['fail_task_deduct_rate_msg'];?>" title="<?php echo $_lang['fail_task_deduct_rate_title'];?>" msgArea="fail_rate_msg" class="txt"/>%<?php echo $_lang['fail_task_deduct_rate_title'];?><span id="fail_rate_msg"></span>
</td>
</tr>

    
  	<tr><th scope="row" width="200"><?php echo $_lang['set_task_time_rule'];?><?php echo $_lang['zh_mh'];?><?php echo $_lang['time_rule_and_join_time_set'];?></th><td>&nbsp;</td></tr>
<tr>
 <th scope="row" width="200" class="t_r"><?php echo $_lang['time_rule'];?><?php echo $_lang['zh_mh'];?></th>
 <td id="td_cash_rul" class="td_cash_rul">
  <ul id="add_new_rul" style="list-style:none">
  	<?php if(is_array($time_rule)) { foreach($time_rule as $k => $v) { ?>
<li>
<span id="span_<?php echo $k;?>"><?php echo $k+1; ?></span>
<input type="hidden" name="">
 <input type="text" size="10" name="timeOld[<?php echo $v['day_rule_id'];?>][rule_cash]" id="rule_cash_<?php echo $k;?>" value="<?php echo  floatval($v['rule_cash']) ?>" limit="required:true;type:float"          msg="<?php echo $_lang['task_min_cash_msg'];?>"    title="<?php echo $_lang['check_min_cash_rule'];?>," msgArea="span_time_<?php echo $k;?>"  class="txt"/><?php echo $_lang['yuan_over'];?> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <input type="text" size="10" name="timeOld[<?php echo $v['day_rule_id'];?>][rule_day]"  id="rule_day_<?php echo $k;?>"  value="<?php echo $v['rule_day'];?>"  limit="required:true;type:int;between:1-" msg="<?php echo $_lang['time_rule_day_msg'];?>" title="<?php echo $_lang['time_rule_day_title'];?>" msgArea="span_time_<?php echo $k;?>"  class="txt"> <?php echo $_lang['day'];?> 
<span id="span_time_<?php echo $k;?>"></span>
<?php if($k>0) { ?><a href="javascript:;" class="del_time_rule" rel="<?php echo $v['day_rule_id'];?>"><?php echo $_lang['delete_rule'];?></a><?php } ?>
</li>
<?php } } ?>
</ul>
<a href="javascript:;" id="add_time_rule"><?php echo $_lang['add_rule'];?></a>
</td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_public_time'];?><?php echo $_lang['zh_mh'];?></th>
 <td>
<input type="text" size="10" id="notice_period"  name="conf[notice_period]"  value="<?php echo $notice_period;?>" limit="type:int;required:true;between:0-" msg="<?php echo $_lang['task_public_time_msg'];?>" title="<?php echo $_lang['task_public_time_title'];?>" msgArea="span_notice_period" class="txt"><?php echo $_lang['task_public_time_notice'];?>
<span id="span_notice_period"></span>
 </td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_min_day'];?><?php echo $_lang['zh_mh'];?></th>
 <td>
<input type="text" size="10" id="min_day"  name="conf[min_day]"  value="<?php echo $min_day;?>" limit="type:int;required:true;between:1-" msg="<?php echo $_lang['task_min_day_msg'];?>" title="<?php echo $_lang['task_min_day_title'];?>" msgArea="span_min_day" class="txt"><?php echo $_lang['task_sub_time_title'];?>
<span id="span_min_day"></span>
 </td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_vote_time'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
<input type="text" size="10" id="vote_period" name="conf[vote_period]"  value="<?php echo $vote_period;?>" limit="type:int;required:true;between:1-" msg="<?php echo $_lang['task_vote_time_msg'];?>" title="<?php echo $_lang['task_vote_time_title'];?>" msgArea="span_vote_period" class="txt"><?php echo $_lang['task_vote_time_notice'];?><br>
<span id="span_vote_period"></span>
</td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['limit_new_register_user_vote_time'];?><?php echo $_lang['zh_mh'];?></th> 
  <td>
 <input type="text" size="10" id="reg_vote_limit"  name="conf[reg_vote_limit]"  value="<?php echo $reg_vote_limit;?>" limit="type:int;required:true" msg="<?php echo $_lang['new_register_user_vote_time_msg'];?>" title="<?php echo $_lang['new_register_user_vote_time_title'];?>" msgArea="reg_vote_limit_time_msg" class="txt"><?php echo $_lang['new_register_user_vote_time_notice'];?>
<br><span id="reg_vote_limit_time_msg"></span>
 </td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['set_choose_time'];?><?php echo $_lang['zh_mh'];?></th> 
 <td>
<input type="text" size="10" name="conf[choose_time]" id="choose_time" value="<?php echo $choose_time;?>"  limit="required:true;type:int;between:1-20" msg="<?php echo $_lang['choose_time_msg'];?>" title="<?php echo $_lang['choose_time_title'];?>"  msgArea="span_draft_time" class="txt"><?php echo $_lang['choose_time_notice'];?><span id="span_draft_time"></span>
</td>
</tr>
<tbody id="agree_is_open_tbody">

<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['confirm_default_agreement_time'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
 <input type="text" class="txt" id="txt_agree_complete_time" name="conf[agree_complete_time]" value="<?php echo $agree_complete_time?>"
   limit="required:true;type:int;between:2-" msg="<?php echo $_lang['agree_complete_2'];?>" title="<?php echo $_lang['agree_complete_2'];?>"
  msgArea="span_agree_complete"><?php echo $_lang['day'];?> &nbsp;<?php echo $_lang['confrim_agreement_time_notice'];?>
 <span id="span_agree_complete"></span>
</td>
</tr>
<!--	<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['sign_default_agreement_time'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
 <input type="text" class="txt" id="txt_agree_sign_time" name="conf[agree_sign_time]" value="<?php echo $agree_sign_time?>"
  limit="required:true;type:int;between:1-" msg="<?php echo $_lang['agree_time_more_than_1'];?>" title="<?php echo $_lang['agree_time_more_than_1'];?>"
  msgArea="span_agree_sign"><?php echo $_lang['day'];?> &nbsp;<?php echo $_lang['default_agreement_time_notice'];?>
  <span id="span_agree_sign"></span>
</td>
</tr>-->
</tbody>


<tr>
 <th scope="row" width="200"><h4><?php echo $_lang['set_delay_rule'];?><?php echo $_lang['zh_mh'];?><?php echo $_lang['task_delay_set_intro'];?></h4><td>
</td></th>  
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['delay_min_cash'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
<input type="text" size="10"  name="conf[min_delay_cash]" id="min_delay_cash" value="<?php echo $min_delay_cash;?>" limit="required:true;type:int;between:1-" msg="<?php echo $_lang['delay_min_cash_msg'];?>" title="<?php echo $_lang['delay_min_cash_title'];?>" msgArea="span_min_delay_cash" class="txt"/><b style="color:red">*</b><?php echo $_lang['yuan'];?><span id="span_min_delay_cash"></span>
</td>
</tr>
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['limit_delay_day'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
<input type="text" size="10"  name="conf[max_delay]" id="max_delay" value="<?php echo $max_delay;?>" limit="type:int;required:true;between:2-" msg="<?php echo $_lang['delay_day_msg'];?>" title="<?php echo $_lang['delay_day_title'];?>" msgArea="span_min_delay" class="txt"/><b style="color:red">*</b><?php echo $_lang['day'];?><span id="span_min_delay"></span>
</td>
</tr>
<tr>	
 <th scope="row" width="200" class="t_r"><?php echo $_lang['set_delay'];?><?php echo $_lang['zh_mh'];?></th> 
 <td>
<ul id="new_delay_rule" class="new_delay_rule" style="list-style:none">
<?php if(is_array($delay_rule)) { foreach($delay_rule as $k => $v) { ?>
<li>
<?php echo $_lang['di'];?><input type="text" size="10" name="delayOld[<?php echo $v['defer_rule_id'];?>][defer_times]" id="defer_times_<?php echo $k;?>"  value="<?php echo $v['defer_times'];?>" readonly="true" class="txt"/><?php echo $_lang['times'];?>
 <?php echo $_lang['delay_rule_notice'];?><input type="text" name="delayOld[<?php echo $v['defer_rule_id'];?>][defer_rate]" id="defer_rate_<?php echo $k;?>" value="<?php echo floatval($v['defer_rate']) ?>" size="10"  limit="required:true;type:int;between:0-100"
 msg="<?php echo $_lang['delay_rule_msg'];?>" title="<?php echo $_lang['delay_rule_title'];?>" msgArea="span_delay_<?php echo $k;?>" class="txt">%<span id="span_delay_<?php echo $k;?>"></span>
<a href="javascript:;" class="del_delay_rule" rel="<?php echo $v['defer_rule_id'];?>"><?php echo $_lang['delete_rule'];?></a>
 		</li>
<?php } } ?>
   </ul>
<a href="javascript:;" id="add_delay_rule"><?php echo $_lang['add_rule'];?></a>
</td>
</tr>

<tr>
<th scope="row" width="200" class="t_r"><b><?php echo $_lang['set_choose_rule'];?><?php echo $_lang['zh_mh'];?><?php echo $_lang['choose_fault_rule_add'];?></b>:<td>&nbsp;</td></th> 
</tr>
<!--
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['choose_in_doing'];?><?php echo $_lang['zh_mh'];?></th> 
<td>
<label for="open_select_yes"><input type="radio" name="conf[open_select]"  <?php if(!$open_select||$open_select =='open') { ?> checked <?php } ?> id="open_select_yes" value="open"><?php echo $_lang['open'];?></label>
<label for="open_select_no"><input type="radio" name="conf[open_select]" <?php if($open_select =='close') { ?> checked <?php } ?> id="open_select_no" value="close"><?php echo $_lang['close'];?></label>
<?php echo $_lang['choose_period_go_into_sp'];?>
</td>
</tr>-->
<tr>
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_automate_choose'];?><?php echo $_lang['zh_mh'];?><?php echo $_lang['auto_choose_set_notice'];?></th> 
 <td>
<label for="end_action_1"><input type="radio"  <?php if($end_action =='refund'||!$end_action) { ?>checked="checked"<?php } ?> name="conf[end_action]" id="end_action_1" value="refund"><?php echo $_lang['close'];?></label>
<label for="end_action_2"><input type="radio" <?php if($end_action =='split' ) { ?>checked="checked"<?php } ?> name="conf[end_action]" id="end_action_2" value="split"><?php echo $_lang['open'];?></label>
<label id="slt" style="display:none"><input type="text" name="conf[witkey_num]" value="<?php echo $witkey_num;?>" id="witkey_num" limit="type:int;between:1-" msg="<?php echo $_lang['task_automate_choose_msg'];?>" title="<?php echo $_lang['task_automate_choose_title'];?>" class="txt"><?php echo $_lang['task_automate_choose_notice'];?></label>

 </td>
</tr>
<tr id="slt_choose_rule" style="display:none">
<th scope="row" width="200" class="t_r"><?php echo $_lang['task_automate_choose_rule'];?><?php echo $_lang['zh_mh'];?></th> 
 <td>
         <select name="conf[auto_choose_rule]" id="auto_choose_rule">
         	<option value="work_time" <?php if(!$auto_choose_rule||$auto_choose_rule=='work_time') { ?>selected="selected"<?php } ?> ><?php echo $_lang['early_hand'];?></option>
<option value="seller_credit" <?php if($auto_choose_rule=='seller_credit') { ?>selected="selected"<?php } ?>><?php echo $_lang['highest_ability'];?></option>
<option value="take_num" <?php if($auto_choose_rule=='take_num') { ?>selected="selected"<?php } ?>><?php echo $_lang['hand_times_most'];?></option>
<option value="master_choose" <?php if($auto_choose_rule=='master_choose') { ?>selected="selected"<?php } ?>><?php echo $_lang['stationmaster_choose'];?></option>
         </select>
<?php echo $_lang['auto_choose_rule_notice'];?>
 </td>
</tr>
<tr>
<th scope="row" width="200">&nbsp;</th>
<td>
            <div class="clearfix padt10">
            <input type="hidden" name="sbt_edit" value="1">
 <button type="button" name="sbt_edit" class="positive primary  button" value="1" onclick="confirm_sub()"><span class="check icon"></span><?php echo $_lang['submit'];?></button>
</div>
</td>
</tr>
  </table>
  </form>
   </div>
 </div>
<script type="text/javascript">

$(function(){

if($("#end_action_1").attr("checked")==true){
$("#slt").hide();
$("#slt_choose_rule").hide();
}
if($("#end_action_2").attr("checked")==true){
 $("#slt").show();
  $("#slt_choose_rule").show();
 }
$("#end_action_1").click(function(){
$("#slt").hide();
$("#slt_choose_rule").hide();
})
$("#end_action_2").click(function(){
  $("#slt").show();
 $("#slt_choose_rule").show();
})

$("#add_time_rule").click(function(){
var ruleNum=parseInt($("#add_new_rul").find("li").length)+1;
var newRule=$("<li><span id='span_"+ruleNum+"'>"+ruleNum+"</span><input type='text' size='10' name='timeNew["+ruleNum+"][rule_cash]' class='txt'/>元以上 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
 "&nbsp;&nbsp;<input type='text' size='10' name='timeNew["+ruleNum+"][rule_day]' class='txt'> 天<br></li>");
newRule.appendTo($("#add_new_rul"));
})	
$(".del_time_rule").click(function(){
var timeRuleId=parseInt($(this).attr("rel"));
if(!isNaN(timeRuleId)){
$.getJSON("<?php echo $ac_url;?>",{ac:'del_time_rule',rule_id:timeRuleId},function(){});
}
$(this).parent().remove();
})	
$("#add_delay_rule").click(function(){
var delayNum=parseInt($("#new_delay_rule").find("li").length)+1;
var newRule=$("<li><?php echo $_lang['di'];?><input type='text' size='10' name='delayNew["+delayNum+"][defer_times]' value="+delayNum+" class='txt'/><?php echo $_lang['times'];?>"+
 "<?php echo $_lang['delay_rule_notice'];?>&nbsp;<input type='text' size='10' name='delayNew["+delayNum+"][defer_rate]' class='txt'>%"+
 "</li>");
newRule.appendTo($("#new_delay_rule"));
})
$(".del_delay_rule").click(function(){
var delayRuleId=parseInt($(this).attr("rel"));
if(!isNaN(delayRuleId)){
$.getJSON("<?php echo $ac_url;?>",{ac:'del_delay_rule',rule_id:delayRuleId},function(){});
}
$(this).parent().remove();
})
  })
  function confirm_sub(){
  	var i = checkForm(document.getElementById('frm_config_reward'));
if(i){
$("#frm_config_reward").submit();
}else{
return false;
}
  }
</script>
</div>
<script type="text/javascript" src="../lang/<?php echo $language?>/script/lang.js"></script>
<script type="text/javascript" src="tpl/js/form_and_validation.js"></script>
<!-- <script type="text/javascript" src="tpl/js/jquery.qtip.min.js"></script> -->
<script type="text/javascript" src="tpl/js/script_calendar.js"></script>
<script type="text/javascript" src="tpl/js/artdialog/artDialog.js"></script>
<script type="text/javascript" src="tpl/js/artdialog/jquery.artDialog.js?skin=default"></script>
<script type="text/javascript" src="tpl/js/artdialog/artDialog.iframeTools.source.js"></script>
<script type="text/javascript" src="tpl/js/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="tpl/js/styleswitch.js"></script>
<script type="text/javascript" src="tpl/js/table.js"></script>
<script type="text/javascript">
var sessionId = "<?php echo $xyq = session_id(); ?>";
function cdel(o, s) {
d = art.dialog;
var c = "<?php echo $_lang['you_comfirm_delete_operate'];?>";
if (s) {
c = s;
}
d.confirm(c, function() {
window.location.href = o.href;
});
return false;
}
function cpass(o, s, type) {
d = art.dialog;
if (type == 1) {
var c = "确认审核通过？";
} else {
var c = "确认审核失败？";
}
if (s) {
c = s;
}
d.confirm(c, function() {
window.location.href = o.href;
});
return false;
}
function cfreeze(o, s, type) {
d = art.dialog;
if (type == 1) {
var c = "确认冻结？";
}
if (s) {
c = s;
}
d.confirm(c, function() {
window.location.href = o.href;
});
return false;
}
function crecomm(o, s, type) {
d = art.dialog;
if (type == 1) {
var c = "确认推荐？";
} else {
var c = "确认取消推荐？";
}
if (s) {
c = s;
}
d.confirm(c, function() {
window.location.href = o.href;
});
return false;
}
function pdel(frm) {
d = art.dialog;
var frm = frm;
var c = "<?php echo $_lang['you_comfirm_delete_operate'];?>";
d.confirm(c, function() {
$("#" + frm).submit();
});
return false;
}
function fdel(frm) {
d = art.dialog;
var frm = frm;
var c = "<?php echo $_lang['you_comfirm_delete_operate'];?>";
d.confirm(c, function() {
$("#" + frm).submit();
});
return false;
}
function batch_act(obj, frm) {
d = art.dialog;
var frm = frm;
var c = $(obj).val();
var conf = $(":checkbox[name='ckb[]']:checked").length;
if (conf > 0) {
d.confirm("<?php echo $_lang['confirm'];?>" + c + '?', function() {
$(".sbt_action").val(c);
$("#" + frm).submit();
});
} else {
d.alert("<?php echo $_lang['has_none_being_choose'];?>");
}
return false;
}
</script>
<!-- <?php if(KEKE_DEBUG) { ?>
<div
style="background-color: red; color: #fff; width: 400px; text-align: center;">
querys:
{eval echo db_factory::create()->get_query_num()}
&nbsp; times:
{eval echo kekezu::execute_time()}
</div>

<?php } ?> -->
</body>
</html><?php keke_tpl_class::ob_out();?>